package main

import "fmt"

type intSlice [] int

func (p intSlice) len() int {
	return len(p)
}

func (p intSlice) less(i, j int) bool {
	return p[i] > p[j]
}

func (p intSlice) swap(i, j int) {
	p[i], p[j] = p[j], p[i]
}

func main() {
	var intArray = intSlice{1, 2};
	fmt.Println("len :", len(intArray))
	fmt.Println("less : ", intArray.less(0, 1))
	intArray.swap(0, 1)
	fmt.Println("swap : ", intArray)
}
